package org.example.judge_feign_api;


import org.example.judge_common.entity.ResponseResult;
import org.example.judge_pojo.Auth;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("oj-judge-admin")
public interface UserClient {

    @PostMapping(value = "/user/addRating/{id}",headers = {"token="+ Auth.ROOT})
    ResponseResult addRating(@RequestParam Integer rating, @PathVariable("id") String userId);

    @PostMapping("/user/easy/{id}")
    ResponseResult getUser(@PathVariable String id);

    @PostMapping(value = "/user/rating/rank/{id}",headers = {"token="+ Auth.ROOT})
    ResponseResult getUserRatingRank(@PathVariable String id);
}
